home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3726 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.8 KB  |  54 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: news.ridgecrest.ca.us!usenet
  3. From: mojaveg@ridgecrest.ca.us (Everett M. Greene)
  4. Subject: FLOOD() questions
  5. X-Nntp-Posting-Host: annex061
  6. Content-Type: text/plain; charset=iso-8859-1
  7. Message-ID: <19960223.7D2BD90.9087@mojaveg.ridgecrest.ca.us>
  8. Sender: usenet@ridgecrest.ca.us (Ridgenet Usenet admin)
  9. Content-Transfer-Encoding: 8bit
  10. Organization: none that you'd notice
  11. X-Newssoftware: GRn 2.1 Feb 19, 1994
  12. Mime-Version: 1.0
  13. Date: Fri, 23 Feb 1996 17:52:29 GMT
  14.  
  15. I've been experimenting with the Flood() graphics operation
  16. and am finding much ambiguity in the RKM explanation.  I've
  17. included an excerpt of the code I've tried (which doesn't
  18. work).
  19.  
  20. void do_window_magic(struct Window *wp)
  21. {
  22.   ULONG            tmp_size;
  23.   PLANEPTR        plane;
  24.   struct TmpRas        tr;
  25.  
  26.   tmp_size = RASSIZE(wp->Width, wp->Height) * wp->WScreen->BitMap.Depth;
  27.   if (plane = AllocRaster(wp->Width, wp->Height)) {
  28.     InitTmpRas(&tr, plane, tmp_size);
  29.     wp->RPort->TmpRas = &tr;
  30.     Flood(wp->RPort, 1, wp->BorderLeft + 1, wp->BorderTop + 1);
  31.     FreeRaster(plane, wp->Width, wp->Height);
  32.   }
  33. }
  34.  
  35. Questions:
  36.  
  37. 1. How does the size computed by RASSIZE compare to that
  38.    generated by AllocRaster() from its width and height
  39.    parameters?
  40.  
  41. 2. Does AllocRaster() allocate CHIP memory?
  42.  
  43. 3. Do you have to AllocRaster() for each bit plane or will
  44.    one allocation suffice for the whole temp raster?
  45.  
  46. 4. If one is flooding within a window, does the temp raster
  47.    need to be any larger than the window?  [The RKM says
  48.    something about making the temp raster the same size as
  49.    the screen which would seem unnecessary.]
  50.  
  51.     -----------------------------------------------------------------------
  52.     Everett M. Greene   (The Mojave Greene, crotalus scutulatus scutulatus)
  53.     Ridgecrest, Ca. 93555           Path: mojaveg@ridgecrest.ca.us
  54.